package dal

// EvaluateRecord 评估记录
type EvaluateRecord struct {
	EvaluateID     int64  `gorm:"primaryKey" json:"evaluate_id"`
	StudentNum     string `gorm:"not null; type:varchar(10)" json:"studentNum"`
	Consultant     string `gorm:"not null" json:"consultant"`
	EvaluationType string `gorm:"not null"  json:"evaluation_type"`
	Problem        string `gorm:"not null" json:"problem"`
	MentalEval     string `gorm:"not null" json:"mental_eval"`
	DangerIssues   string `gorm:"not null" json:"danger_issues"`
}

func (s *EvaluateRecord) GetEvaluateRecord(num string) ([]EvaluateRecord, error) {
	var EvaluateRecord []EvaluateRecord
	return EvaluateRecord, DB.Where("student_num = ?", num).Find(&EvaluateRecord).Error
}
